<?php

namespace App\Http\Requests\ExchangeController;

use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;

class StoreRequest extends FormRequest
{
    public function authorize()
    {
        return true;
    }

    public function rules()
    {
        $rules = [
            'dse_number' => ['required', 'numeric', 'min:0.0001'],
            'pay_password' => ['required', 'payPassword'],
        ];

        return $rules;
    }

    /**
     * @return array
     */
    public function messages()
    {
        return [
            'dse_number.required' => __('数量必填'),
            'dse_number.numeric' => __('DSE数量必须数字'),
            'dse_number.min' => __('DSE数量最小0.0001'),
        ];
    }
}
